<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>facerecognition.faceDetect.FaceDetect</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Facerecognition</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;facerecognition ::
        <a href="facerecognition.faceDetect-module.html">Module&nbsp;faceDetect</a> ::
        Class&nbsp;FaceDetect
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="facerecognition.faceDetect.FaceDetect-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class FaceDetect</h1><p class="nomargin-top"></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">FaceDetect</strong>
</pre>

<hr />
<p>Used to detect, capture, save, update and match faces. Can also draw a
  live stream of the (web)cam.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">screen</span>,
        <span class="summary-sig-arg">sql</span>,
        <span class="summary-sig-arg">scene</span>=<span class="summary-sig-default">None</span>)</span><br />
      Initialization of FaceDetect.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#equalizeHist" class="summary-sig-name">equalizeHist</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">img</span>)</span><br />
      Shrinks, normalizes the brightness and increases contrast of the 
      image.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#detect_face" class="summary-sig-name">detect_face</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">img</span>)</span><br />
      Tries to detect a face and if detected drawing an Ellipse around it.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#get_list_max" class="summary-sig-name">get_list_max</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">index_list</span>,
        <span class="summary-sig-arg">count_list</span>,
        <span class="summary-sig-arg">matches_list</span>)</span><br />
      Returns a list of users with the most matches.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#get_best_matches" class="summary-sig-name">get_best_matches</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">matches</span>)</span><br />
      Returns the best matches based on how often the match is found in the
      list.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_most_recent_faces"></a><span class="summary-sig-name">get_most_recent_faces</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns all face_ids of the the three most recent pictures of each 
      user.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#matchTemplate" class="summary-sig-name">matchTemplate</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">capture</span>,
        <span class="summary-sig-arg">src</span>)</span><br />
      Compares a template against overlapped image regions.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#matchShapes" class="summary-sig-name">matchShapes</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">capture</span>,
        <span class="summary-sig-arg">src</span>)</span><br />
      Compares two shapes.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#match_all" class="summary-sig-name">match_all</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">face_ids</span>)</span><br />
      Going either to the 'User List' window (when no matches were found) 
      or to the 'Match' window showing a variable amount of the found 
      matches on the screen.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#match" class="summary-sig-name">match</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">img</span>,
        <span class="summary-sig-arg">src</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">fingerprint.png</code><code class="variable-quote">'</code></span>)</span><br />
      Matches the image with the source image.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#save_tmp_image" class="summary-sig-name">save_tmp_image</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">img</span>)</span><br />
      Saves the capture(s), taken during the login sequence, in '/tmp' so 
      they can be used later on.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#save_diffs" class="summary-sig-name">save_diffs</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">tmp_filename</span>,
        <span class="summary-sig-arg">pic_name</span>=<span class="summary-sig-default">None</span>)</span><br />
      Saves the diff values in users_faces and the picture in 'capture/'
The maximum rows allowed is specified in conf.py, when reached the oldest will get replaced by a newer.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#count_down" class="summary-sig-name">count_down</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Counts from the number specified in conf.py till 0.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="reset_countdown"></a><span class="summary-sig-name">reset_countdown</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Resets the countdown to it's original number of seconds.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="cancel_countdown"></a><span class="summary-sig-name">cancel_countdown</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Cancels the countdown by setting the amount of seconds left to 0.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#take_pictures" class="summary-sig-name">take_pictures</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">frame</span>)</span><br />
      Works together with the countdown and takes a variable amount of 
      pictures after the countdown is complete.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#set_user_id" class="summary-sig-name">set_user_id</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">user_id</span>)</span><br />
      Sets the global user_id parameter.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="facerecognition.faceDetect.FaceDetect-class.html#draw_cam" class="summary-sig-name">draw_cam</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Draws a frame of the (web)cam on the screen.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="login"></a><span class="summary-sig-name">login</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns the frame of the (web)cam while counting down and taking 
      picture(s) afterwards.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_cam_frame"></a><span class="summary-sig-name">get_cam_frame</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Creates and returns the actual (web)cam frame.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">screen</span>,
        <span class="sig-arg">sql</span>,
        <span class="sig-arg">scene</span>=<span class="sig-default">None</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Initialization of FaceDetect.
Creates the necessary global parameters and creates 2 directories when not existing.
Parameters: display screen - drawing screen
            SQL sql - instance of SQL()
            Scene scene - instance of Scene()

</pre>
  <dl class="fields">
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="equalizeHist"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">equalizeHist</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">img</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Shrinks, normalizes the brightness and increases contrast of the 
  image. Returns an IplImage. Parameters: IplImage img - image of frame of 
  the (web)cam</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="detect_face"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">detect_face</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">img</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Tries to detect a face and if detected drawing an Ellipse around it. 
  Parameters: IplImage img - image of frame of the (web)cam</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="get_list_max"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_list_max</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">index_list</span>,
        <span class="sig-arg">count_list</span>,
        <span class="sig-arg">matches_list</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Returns a list of users with the most matches. 
Can only be used together with get_best_matches().
Parameters: list index_list - list of index numbers refering to the same index in matches_list
            list count_list - list of count numbers how often each user occurs.
            list matches_list - list of users (each matching user occurs once in this list)
The indexes of all lists correspond which each other. So index_list[0] = count_list[0] = match_list[0]

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="get_best_matches"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_best_matches</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">matches</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Returns the best matches based on how often the match is found in the 
  list. The amount returned can be specified in conf.py. Parameters: list 
  matches - list of all matching users, meaning that an user can occur more
  then once.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="matchTemplate"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">matchTemplate</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">capture</span>,
        <span class="sig-arg">src</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Compares a template against overlapped image regions.
Parameters: IplImage capture - capture image saved in '/tmp'.
            IplImage src - source image which capture is compared to.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="matchShapes"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">matchShapes</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">capture</span>,
        <span class="sig-arg">src</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Compares two shapes.
Parameters: IplImage capture - capture image saved in '/tmp'.
            IplImage src - source image which capture is compared to.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="match_all"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">match_all</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">face_ids</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Going either to the 'User List' window (when no matches were found) or
  to the 'Match' window showing a variable amount of the found matches on 
  the screen. Matches all capture(s) with the three most recent pictures of
  each user. Parameters: list face_ids - user faces that are going to be 
  matches</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="match"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">match</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">img</span>,
        <span class="sig-arg">src</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">fingerprint.png</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Matches the image with the source image.
Returns the values that were created by matching.
Parameters: string img - name of image saved in '/tmp'.
            string src - name of source image

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="save_tmp_image"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">save_tmp_image</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">img</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Saves the capture(s), taken during the login sequence, in '/tmp' so 
  they can be used later on. Parameters: IplImage img - image of frame of 
  the (web)cam</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="save_diffs"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">save_diffs</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">tmp_filename</span>,
        <span class="sig-arg">pic_name</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Saves the diff values in users_faces and the picture in 'capture/'
The maximum rows allowed is specified in conf.py, when reached the oldest will get replaced by a newer.
Parameters: string tmp_filename - name of image saved in '/tmp'.
            string pic_name - if None then the pic_name is created else it is used for updating.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="count_down"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">count_down</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Counts from the number specified in conf.py till 0. The numbers are 
  shown on the screen when used.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="take_pictures"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">take_pictures</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">frame</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Works together with the countdown and takes a variable amount of 
  pictures after the countdown is complete. The amount of pictures taken 
  can be modified in conf.py. Parameters: IplImage frame - frame of the 
  (web)cam</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="set_user_id"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_user_id</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">user_id</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Sets the global user_id parameter. Parameters: int user_id - user 
  identification code</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="draw_cam"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">draw_cam</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Draws a frame of the (web)cam on the screen. When used in a loop it 
  looks like a live stream. Returns a modified frame of the (web)cam.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Facerecognition</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Tue Jul  5 14:23:35 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
